UpdateResource (kernel32)
Last changed: -83.226.86.117

.
Summary

C# Signature:

[DllImport("kernel32.dll", SetLastError=true)]
static extern bool UpdateResource(IntPtr hUpdate, string lpType, string lpName, ushort wLanguage, IntPtr lpData, uint cbData);

User-Defined Types:

None.

Notes:

see BeginUpdateResource to get a handle for hUpdate, and EndUpdateResource to apply the update changes.

sending NULL (probably 0) to lpData will delete the file named at lpName.

Tips & Tricks:

Please add some!

You can also send a byte[] to lpData with the content of the resource (with byte[] instead of IntPtr as the type for lpData), but I'm not sure how safe this is.

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation